/**
 * Created by Richard Radlherr.
 * Date: 04.06.2006 17:44
 */

using System;
using System.Collections.Generic;

namespace TagTool.Core
{
	
	public abstract class Slot
	{
		private String name;
		private String valueTypeName = null;
		
		private BaseNode owner;
		private Type argumentType;

		public Slot(BaseNode owner, String name, Type argumentType)
		{
			this.name = name;
			this.owner = owner;
			this.argumentType = argumentType;
		}

		public String Name
		{
			get { return name; }
			set { name = value; }
		}
		
		public String ValueTypeName
		{
			get { return valueTypeName; }
			set { valueTypeName = value; }
		}
		
		public abstract bool Allowed(Object obj);
		
		
		public Type ArgumentType
		{
			get { return argumentType; }
		}
		
		public override string ToString()
		{
			return name;
		}
		
		public abstract Object Value 
		{
			get;
			set;
		}
		
		public BaseNode Owner
		{
			get { return owner; }
		}
		
		public abstract bool Editable
		{
			get;
		}
		
		public abstract void Parse(String description);
	}
}
